package com.next

class Vehicle
{
    Date buildTime
    //车辆出厂时间
    String projectName
    //零贷项目号名称
    CollateralType type
    //押品类型：住宅、车
    CollateralSubtype subtype
    //押品子类型(车辆类型)
    Double downPaymentAmount
    //首付金额
    String downPaymentSource
    //首付款来源
    Double purchaseAmount
    //购买金额
    String purchaseState
    //付款情况
    Date purchaseDate
    //买入日期
    String vehicleProvider
    //销售商名称
    String engineCode
    //发动机号
    String carframeCode
    //车架号
    String vehicleBrand
    //车辆品牌
    String vehicleLicense
    //车辆牌号
    String description
    //车辆概况
    String purpose
    //购买用途
    Date startTime
    //统计开始时间
    Date endTime
    //统计截止时间
    String registerDate
    //登记日期
    String registerAccount
    // 登记机构
    String registerUser
    //登记人
    String propertySerialNumber
    //购车合同号
    Double loanToValue = 0
    //抵押率

    Date createdDate = new Date()
    Date modifiedDate = new Date()
    User createdBy
    User modifiedBy

    Double vehicleAmount
    // 净车价
    String manufacturer
    // 汽车厂商
    String distributorCustomerCode
    // 经销商客户号
    String purchaseSite
    // 购车场地
    String vehicleSeries
    // 汽车系列
    String manufacturerVehicleMarque
    // 厂牌车型
    String projectCode
    // 零贷项目号
    String commercialWarrantyCode
    // 商业保单号
    String commercialWarranVerifyMethod
    // 商业保单核验方式
    Double vehicleLossInsurance
    // 机动车损失险
    Double thirdDutyInsurance
    // 第三者责任险
    Double purchaseTaxAmount
    // 购车税价合计
    String purchaseInvoiceVerifyMethod
    // 购车发票核验方式
    String purchaseTaxPayTaxesCode
    // 购置税完税识别号
    Double purchaseTaxPayTaxesAmount
    // 购置税完税实缴金额
    String purchaseTaxPayTaxesVerifyMethod
    // 购置税完税核验方式

    Province province
    // 省份
    City city
    // 城市
    String importOddNumber
    // 进口单号
    //
    VehicleBrand brand
    //品牌
    VehicleSeries series
    //系列
    VehicleMarque marque
    //型号

    static belongsTo = [opportunity: Opportunity]

    static mapping = {
        purchaseInvoiceVerifyMethod column: '`purchase_invoice_v_method`'
        purchaseTaxPayTaxesVerifyMethod column: '`purchase_tax_paytax_v_method`'
        commercialWarranVerifyMethod column: '`commercial_warran_v_method`'
    }

    static constraints = {
        type nullable: true, blank: true
        subtype nullable: true, blank: true
        downPaymentAmount nullable: true, blank: true
        downPaymentSource nullable: true, blank: true, maxSize: 32
        purchaseAmount nullable: true, blank: true
        purchaseState nullable: true, blank: true, maxSize: 32
        purchaseDate nullable: true, blank: true
        vehicleProvider nullable: true, blank: true, maxSize: 32
        engineCode nullable: true, blank: true, maxSize: 32
        carframeCode nullable: true, blank: true, maxSize: 32
        vehicleBrand nullable: true, blank: true, maxSize: 32
        vehicleLicense nullable: true, blank: true, maxSize: 16
        description nullable: true, blank: true, maxSize: 128

        purpose nullable: true, blank: true, maxSize: 32, inList: ["自用", "经营"]
        startTime nullable: true, blank: true
        endTime nullable: true, blank: true
        registerDate nullable: true, blank: true
        registerAccount nullable: true, blank: true, maxSize: 32
        registerUser nullable: true, blank: true, maxSize: 32
        buildTime nullable: true, blank: true
        propertySerialNumber nullable: true, blank: true, maxSize: 64

        vehicleAmount nullable: true, blank: true
        manufacturer nullable: true, blank: true, maxSize: 32
        distributorCustomerCode nullable: true, blank: true, maxSize: 32
        purchaseSite nullable: true, blank: true, maxSize: 64, inList: ["国产", "进口"]

        createdDate nullable: true, blank: true
        modifiedDate nullable: true, blank: true
        createdBy nullable: true, blank: true
        modifiedBy nullable: true, blank: true
        projectName nullable: true, blank: true
        vehicleSeries blank: true, nullable: true, maxSize: 32
        manufacturerVehicleMarque blank: true, nullable: true, maxSize: 32
        projectCode blank: true, nullable: true, maxSize: 32
        commercialWarrantyCode blank: true, nullable: true, maxSize: 32
        commercialWarranVerifyMethod blank: true, nullable: true, maxSize: 32, inList: ["系统自动验证", "人工验证"]
        vehicleLossInsurance blank: true, nullable: true
        thirdDutyInsurance blank: true, nullable: true
        purchaseTaxAmount blank: true, nullable: true
        purchaseInvoiceVerifyMethod blank: true, nullable: true, maxSize: 32, inList: ["系统自动验证", "人工验证"]
        purchaseTaxPayTaxesCode blank: true, nullable: true, maxSize: 32
        purchaseTaxPayTaxesAmount blank: true, nullable: true
        purchaseTaxPayTaxesVerifyMethod blank: true, nullable: true, maxSize: 32, inList: ["系统自动验证", "人工验证"]

        province nullable: true, blank: true
        city nullable: true, blank: true
        importOddNumber nullable: true, blank: true, maxSize: 32

        brand nullable: true, blank: true
        series nullable: true, blank: true
        marque nullable: true, blank: true
    }
}
